<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>

<c:set var="context"
	value="${pageContext.request.servletContext.contextPath}" />
<script type="text/javascript">
           $(function () {
                $('#datetimepicker6').datetimepicker();
            });
</script>
<!-- Template for all sub-pages -->
<div id="portal_main_content" align="left">
	<!-- Don't change this -->
	<div id="site_title">

		<!-- ************** -->
		<!-- Able to change -->
		<h2>Edit Open Course</h2>
	</div>
	<!-- Don't change this -->
	<div id="site_content">
		<div id="btn_control">

			<!-- ************** -->
			<!-- Able to change -->

		</div>
		<div id="main_content">

			<!-- ************** -->
			<!-- Able to change -->
			<form:form action="../edit/${openCourse.openCourseId }" modelAttribute="openCourse" method="post"
				style="min-width: 240px;">
				<fieldset class="input_table">
					<legend>Edit Open Course: ${openCourse.openCourseId}</legend>
					<div class="input_row hidden">
						<div>OpenCourse ID</div>
						<div>
							<form:input path="openCourseId" placeholder="Id"
								cssClass="form-control" />
						</div>
						<div>
							<form:errors path="openCourseId" cssClass="error" />
						</div>
					</div>
					<div class="input_row">
						<div>Start Day</div>
						<div>
							<form:input path="startDay" placeholder="dd/MM/yyyy" data-date-format="YYYY/MM/DD"
								cssClass="form-control"/>
						</div>
						<div>
							<form:errors path="startDay" cssClass="error" />
						</div>
					</div>
					
					<div class="input_row">
						<div>Description</div>
						<div>
							<form:textarea path="description" placeholder="description"
								cssClass="form-control" cols="30"/>
						</div>
						<div>
							<form:errors path="description" cssClass="error" />
						</div>
					</div>
					
					<div class="input_row hidden">
						<div>CourseId</div>
						<div>
							<form:input path="course.courseId" 
								cssClass="form-control"/>
						</div>
						<div>
							<form:errors path="course.courseId" cssClass="error" />
						</div>
					</div>
					
					<div class="input_row">
						<div></div>
						<div>
							<input type="submit" value="Save" class="btn btn-primary" /> <input
								type="reset" value="Cancel" class="btn btn-primary" />
						</div>
						<div></div>
					</div>
				</fieldset>
			</form:form>
		</div>
		<div id="table">
			<!-- ************** -->
			<!-- Able to change -->
		</div>

	</div>
</div>

